<?php

class SelectModel extends CI_Model {

    function __construct() {
        parent::__construct();
    }

    # Select All data
    public function selectData($table) {
        $this->db->where('Enable', true);
        return $this->db->get($table);
    }

    # Select All data by condition
    public function selectDataWhere($table, $field, $val) {
        $this->db->where($field, $val);
        $this->db->where('Enable', true);
        return $this->db->get($table);
    }
}